package com.kotlinvben.enumeration

enum class Status(val code: Int, val description: String) {
    DISABLED(0, "禁用"),
    ENABLED(1, "启用"),
    UNKNOWN(2, "禁用");

    companion object {
        fun fromCode(code: Int): Status {
            return entries.find { it.code == code } ?: UNKNOWN
        }
    }
} 